/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package view;

import view.gui_grupo.form_grupo;
import view.gui_usuario.form_usuario;
import java.awt.Toolkit;
import java.text.SimpleDateFormat;
import java.util.Date;
import javax.swing.JOptionPane;

/**
 *
 * @author Michael
 */
public final class gui_principal extends javax.swing.JFrame {

    /**
     * Creates new form gui_principal
     */
    public gui_principal() {
        initComponents();
        this.setExtendedState(MAXIMIZED_BOTH);
        this.DataHora();
        this.setIcon();
        form_capa fcapa = new form_capa();
        this.pnlTela.add(fcapa);
        this.pnlTela.repaint();
        this.pnlTela.revalidate();
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        mnuAtalho = new javax.swing.JToolBar();
        btnSair2 = new javax.swing.JButton();
        btnSair3 = new javax.swing.JButton();
        btnSair4 = new javax.swing.JButton();
        btnSair5 = new javax.swing.JButton();
        btnSair6 = new javax.swing.JButton();
        btnSair7 = new javax.swing.JButton();
        btnSair8 = new javax.swing.JButton();
        btnSair9 = new javax.swing.JButton();
        btnSair = new javax.swing.JButton();
        btnSair1 = new javax.swing.JButton();
        pnlRodape = new javax.swing.JPanel();
        lblUsuario = new javax.swing.JLabel();
        lblData = new javax.swing.JLabel();
        pnlCentro = new javax.swing.JPanel();
        pnlDireito = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        jLabel7 = new javax.swing.JLabel();
        jLabel8 = new javax.swing.JLabel();
        jLabel9 = new javax.swing.JLabel();
        jLabel10 = new javax.swing.JLabel();
        jLabel11 = new javax.swing.JLabel();
        jLabel12 = new javax.swing.JLabel();
        jLabel13 = new javax.swing.JLabel();
        jLabel14 = new javax.swing.JLabel();
        jLabel15 = new javax.swing.JLabel();
        jLabel16 = new javax.swing.JLabel();
        pnlTela = new javax.swing.JPanel();
        mnuMenu = new javax.swing.JMenuBar();
        mnuManutencao = new javax.swing.JMenu();
        jMenuItem4 = new javax.swing.JMenuItem();
        jMenuItem5 = new javax.swing.JMenuItem();
        jMenuItem7 = new javax.swing.JMenuItem();
        jMenuItem15 = new javax.swing.JMenuItem();
        mnuConfiguracao = new javax.swing.JMenu();
        jMenuItem6 = new javax.swing.JMenuItem();
        jMenuItem17 = new javax.swing.JMenuItem();
        mnuNivelAcesso = new javax.swing.JMenuItem();
        mnuCaixa = new javax.swing.JMenu();
        jMenuItem1 = new javax.swing.JMenuItem();
        jMenuItem2 = new javax.swing.JMenuItem();
        jMenuItem3 = new javax.swing.JMenuItem();
        mnuPedido = new javax.swing.JMenu();
        jMenuItem8 = new javax.swing.JMenuItem();
        jMenuItem9 = new javax.swing.JMenuItem();
        mnuConsulta = new javax.swing.JMenu();
        jMenuItem10 = new javax.swing.JMenuItem();
        jMenuItem11 = new javax.swing.JMenuItem();
        jMenuItem12 = new javax.swing.JMenuItem();
        jMenuItem13 = new javax.swing.JMenuItem();
        jMenuItem14 = new javax.swing.JMenuItem();
        mnuGeral = new javax.swing.JMenu();
        jMenuItem16 = new javax.swing.JMenuItem();
        jMenuItem18 = new javax.swing.JMenuItem();

        setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);
        setTitle("Sistema");
        setResizable(false);

        mnuAtalho.setFloatable(false);
        mnuAtalho.setRollover(true);

        btnSair2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/img/32x32/user.png"))); // NOI18N
        btnSair2.setToolTipText("Manutenção de usuário");
        btnSair2.setFocusable(false);
        btnSair2.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnSair2.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        btnSair2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnSair2ActionPerformed(evt);
            }
        });
        mnuAtalho.add(btnSair2);

        btnSair3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/img/32x32/product.png"))); // NOI18N
        btnSair3.setToolTipText("Manutenção de produto");
        btnSair3.setFocusable(false);
        btnSair3.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnSair3.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        btnSair3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnSair3ActionPerformed(evt);
            }
        });
        mnuAtalho.add(btnSair3);

        btnSair4.setIcon(new javax.swing.ImageIcon(getClass().getResource("/img/32x32/bank.png"))); // NOI18N
        btnSair4.setToolTipText("Caixa");
        btnSair4.setFocusable(false);
        btnSair4.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnSair4.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        btnSair4.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnSair4ActionPerformed(evt);
            }
        });
        mnuAtalho.add(btnSair4);

        btnSair5.setIcon(new javax.swing.ImageIcon(getClass().getResource("/img/32x32/settings.png"))); // NOI18N
        btnSair5.setToolTipText("Configurações");
        btnSair5.setFocusable(false);
        btnSair5.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnSair5.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        btnSair5.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnSair5ActionPerformed(evt);
            }
        });
        mnuAtalho.add(btnSair5);

        btnSair6.setIcon(new javax.swing.ImageIcon(getClass().getResource("/img/32x32/statistics.png"))); // NOI18N
        btnSair6.setToolTipText("Relatórios");
        btnSair6.setFocusable(false);
        btnSair6.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnSair6.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        btnSair6.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnSair6ActionPerformed(evt);
            }
        });
        mnuAtalho.add(btnSair6);

        btnSair7.setIcon(new javax.swing.ImageIcon(getClass().getResource("/img/32x32/category.png"))); // NOI18N
        btnSair7.setToolTipText("Manutenção de categoria");
        btnSair7.setFocusable(false);
        btnSair7.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnSair7.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        btnSair7.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnSair7ActionPerformed(evt);
            }
        });
        mnuAtalho.add(btnSair7);

        btnSair8.setIcon(new javax.swing.ImageIcon(getClass().getResource("/img/32x32/consulting.png"))); // NOI18N
        btnSair8.setToolTipText("Suporte");
        btnSair8.setFocusable(false);
        btnSair8.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnSair8.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        btnSair8.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnSair8ActionPerformed(evt);
            }
        });
        mnuAtalho.add(btnSair8);

        btnSair9.setIcon(new javax.swing.ImageIcon(getClass().getResource("/img/32x32/order.png"))); // NOI18N
        btnSair9.setToolTipText("Orçamento");
        btnSair9.setFocusable(false);
        btnSair9.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnSair9.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        btnSair9.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnSair9ActionPerformed(evt);
            }
        });
        mnuAtalho.add(btnSair9);

        btnSair.setIcon(new javax.swing.ImageIcon(getClass().getResource("/img/32x32/logout.png"))); // NOI18N
        btnSair.setToolTipText("Sair do sistema");
        btnSair.setFocusable(false);
        btnSair.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnSair.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        btnSair.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnSairActionPerformed(evt);
            }
        });
        mnuAtalho.add(btnSair);

        btnSair1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/img/32x32/refresh.png"))); // NOI18N
        btnSair1.setToolTipText("Limpar tela");
        btnSair1.setFocusable(false);
        btnSair1.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnSair1.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        btnSair1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnSair1ActionPerformed(evt);
            }
        });
        mnuAtalho.add(btnSair1);

        pnlRodape.setBorder(javax.swing.BorderFactory.createEtchedBorder());

        lblUsuario.setFont(new java.awt.Font("sansserif", 1, 12)); // NOI18N
        lblUsuario.setIcon(new javax.swing.ImageIcon(getClass().getResource("/img/16x16/user.png"))); // NOI18N
        lblUsuario.setText("Operador: Fulano de Tal");

        lblData.setFont(new java.awt.Font("sansserif", 1, 12)); // NOI18N
        lblData.setIcon(new javax.swing.ImageIcon(getClass().getResource("/img/16x16/full-time.png"))); // NOI18N
        lblData.setText("Data e hora");

        javax.swing.GroupLayout pnlRodapeLayout = new javax.swing.GroupLayout(pnlRodape);
        pnlRodape.setLayout(pnlRodapeLayout);
        pnlRodapeLayout.setHorizontalGroup(
            pnlRodapeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlRodapeLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(lblUsuario)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(lblData)
                .addContainerGap())
        );
        pnlRodapeLayout.setVerticalGroup(
            pnlRodapeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlRodapeLayout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(pnlRodapeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblUsuario)
                    .addComponent(lblData))
                .addContainerGap())
        );

        pnlCentro.setBorder(javax.swing.BorderFactory.createEtchedBorder());

        pnlDireito.setBorder(javax.swing.BorderFactory.createEtchedBorder());

        jLabel1.setFont(new java.awt.Font("sansserif", 1, 12)); // NOI18N
        jLabel1.setText("Cadastro de operador");
        jLabel1.setToolTipText("");

        jLabel2.setFont(new java.awt.Font("sansserif", 1, 18)); // NOI18N
        jLabel2.setForeground(new java.awt.Color(255, 0, 0));
        jLabel2.setText("F1");

        jLabel3.setFont(new java.awt.Font("sansserif", 1, 12)); // NOI18N
        jLabel3.setText("Cadastro de produto");

        jLabel4.setFont(new java.awt.Font("sansserif", 1, 18)); // NOI18N
        jLabel4.setForeground(new java.awt.Color(255, 0, 0));
        jLabel4.setText("F1");

        jLabel5.setFont(new java.awt.Font("sansserif", 1, 12)); // NOI18N
        jLabel5.setText("Cadastro de produto");

        jLabel6.setFont(new java.awt.Font("sansserif", 1, 18)); // NOI18N
        jLabel6.setForeground(new java.awt.Color(255, 0, 0));
        jLabel6.setText("F1");

        jLabel7.setFont(new java.awt.Font("sansserif", 1, 12)); // NOI18N
        jLabel7.setText("Cadastro de produto");

        jLabel8.setFont(new java.awt.Font("sansserif", 1, 18)); // NOI18N
        jLabel8.setForeground(new java.awt.Color(255, 0, 0));
        jLabel8.setText("F1");

        jLabel9.setFont(new java.awt.Font("sansserif", 1, 18)); // NOI18N
        jLabel9.setForeground(new java.awt.Color(255, 0, 0));
        jLabel9.setText("F1");

        jLabel10.setFont(new java.awt.Font("sansserif", 1, 12)); // NOI18N
        jLabel10.setText("Cadastro de produto");

        jLabel11.setFont(new java.awt.Font("sansserif", 1, 12)); // NOI18N
        jLabel11.setText("Cadastro de produto");

        jLabel12.setFont(new java.awt.Font("sansserif", 1, 18)); // NOI18N
        jLabel12.setForeground(new java.awt.Color(255, 0, 0));
        jLabel12.setText("F1");

        jLabel13.setFont(new java.awt.Font("sansserif", 1, 12)); // NOI18N
        jLabel13.setText("Cadastro de produto");

        jLabel14.setFont(new java.awt.Font("sansserif", 1, 18)); // NOI18N
        jLabel14.setForeground(new java.awt.Color(255, 0, 0));
        jLabel14.setText("F1");

        jLabel15.setFont(new java.awt.Font("sansserif", 1, 18)); // NOI18N
        jLabel15.setForeground(new java.awt.Color(255, 0, 0));
        jLabel15.setText("F5");

        jLabel16.setFont(new java.awt.Font("sansserif", 1, 12)); // NOI18N
        jLabel16.setText("Limpar tela");

        javax.swing.GroupLayout pnlDireitoLayout = new javax.swing.GroupLayout(pnlDireito);
        pnlDireito.setLayout(pnlDireitoLayout);
        pnlDireitoLayout.setHorizontalGroup(
            pnlDireitoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlDireitoLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlDireitoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlDireitoLayout.createSequentialGroup()
                        .addComponent(jLabel2)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 130, Short.MAX_VALUE))
                    .addGroup(pnlDireitoLayout.createSequentialGroup()
                        .addComponent(jLabel4)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addGroup(pnlDireitoLayout.createSequentialGroup()
                        .addComponent(jLabel6)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addGroup(pnlDireitoLayout.createSequentialGroup()
                        .addComponent(jLabel8)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel7, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addGroup(pnlDireitoLayout.createSequentialGroup()
                        .addComponent(jLabel9)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel10, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addGroup(pnlDireitoLayout.createSequentialGroup()
                        .addComponent(jLabel12)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel11, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addGroup(pnlDireitoLayout.createSequentialGroup()
                        .addComponent(jLabel14)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel13, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addGroup(pnlDireitoLayout.createSequentialGroup()
                        .addComponent(jLabel15)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel16, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                .addContainerGap())
        );
        pnlDireitoLayout.setVerticalGroup(
            pnlDireitoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlDireitoLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlDireitoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlDireitoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jLabel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlDireitoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jLabel6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlDireitoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jLabel8, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlDireitoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jLabel9, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jLabel10, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlDireitoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jLabel12, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jLabel11, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlDireitoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jLabel14, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jLabel13, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlDireitoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jLabel15, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jLabel16, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(12, Short.MAX_VALUE))
        );

        pnlTela.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.LOWERED));
        pnlTela.setLayout(new java.awt.CardLayout());

        javax.swing.GroupLayout pnlCentroLayout = new javax.swing.GroupLayout(pnlCentro);
        pnlCentro.setLayout(pnlCentroLayout);
        pnlCentroLayout.setHorizontalGroup(
            pnlCentroLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlCentroLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(pnlTela, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(pnlDireito, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );
        pnlCentroLayout.setVerticalGroup(
            pnlCentroLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlCentroLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlCentroLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(pnlDireito, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(pnlTela, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );

        mnuManutencao.setText("Cadastros");

        jMenuItem4.setText("Categoria");
        mnuManutencao.add(jMenuItem4);

        jMenuItem5.setText("Grupo");
        jMenuItem5.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem5ActionPerformed(evt);
            }
        });
        mnuManutencao.add(jMenuItem5);

        jMenuItem7.setText("Produto");
        mnuManutencao.add(jMenuItem7);

        jMenuItem15.setText("Fornecedor");
        mnuManutencao.add(jMenuItem15);

        mnuMenu.add(mnuManutencao);

        mnuConfiguracao.setText("Manutenção");

        jMenuItem6.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F1, 0));
        jMenuItem6.setIcon(new javax.swing.ImageIcon(getClass().getResource("/img/16x16/user.png"))); // NOI18N
        jMenuItem6.setText("Operador");
        jMenuItem6.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem6ActionPerformed(evt);
            }
        });
        mnuConfiguracao.add(jMenuItem6);

        jMenuItem17.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F1, java.awt.event.InputEvent.ALT_MASK | java.awt.event.InputEvent.CTRL_MASK));
        jMenuItem17.setIcon(new javax.swing.ImageIcon(getClass().getResource("/img/16x16/full-time.png"))); // NOI18N
        jMenuItem17.setText("Horário de funcionamento");
        mnuConfiguracao.add(jMenuItem17);

        mnuNivelAcesso.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F2, java.awt.event.InputEvent.ALT_MASK | java.awt.event.InputEvent.CTRL_MASK));
        mnuNivelAcesso.setIcon(new javax.swing.ImageIcon(getClass().getResource("/img/16x16/lock.png"))); // NOI18N
        mnuNivelAcesso.setText("Níveis de acesso");
        mnuConfiguracao.add(mnuNivelAcesso);

        mnuMenu.add(mnuConfiguracao);

        mnuCaixa.setText("Caixa");

        jMenuItem1.setText("Abrir caixa");
        mnuCaixa.add(jMenuItem1);

        jMenuItem2.setText("Sangria");
        mnuCaixa.add(jMenuItem2);

        jMenuItem3.setText("Fechar caixa");
        mnuCaixa.add(jMenuItem3);

        mnuMenu.add(mnuCaixa);

        mnuPedido.setText("Pedido");

        jMenuItem8.setText("Novo pedido");
        mnuPedido.add(jMenuItem8);

        jMenuItem9.setText("Novo orçamento");
        mnuPedido.add(jMenuItem9);

        mnuMenu.add(mnuPedido);

        mnuConsulta.setText("Consulta");

        jMenuItem10.setText("Operadores");
        mnuConsulta.add(jMenuItem10);

        jMenuItem11.setText("Produtos");
        mnuConsulta.add(jMenuItem11);

        jMenuItem12.setText("Orçamentos");
        mnuConsulta.add(jMenuItem12);

        jMenuItem13.setText("Pedidos");
        mnuConsulta.add(jMenuItem13);

        jMenuItem14.setText("Fornecedores");
        mnuConsulta.add(jMenuItem14);

        mnuMenu.add(mnuConsulta);

        mnuGeral.setText("Geral");

        jMenuItem16.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F4, java.awt.event.InputEvent.ALT_MASK));
        jMenuItem16.setIcon(new javax.swing.ImageIcon(getClass().getResource("/img/16x16/logout.png"))); // NOI18N
        jMenuItem16.setText("Encerrar sistema");
        jMenuItem16.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem16ActionPerformed(evt);
            }
        });
        mnuGeral.add(jMenuItem16);

        jMenuItem18.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F5, 0));
        jMenuItem18.setIcon(new javax.swing.ImageIcon(getClass().getResource("/img/16x16/refresh.png"))); // NOI18N
        jMenuItem18.setText("Limpar tela");
        jMenuItem18.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem18ActionPerformed(evt);
            }
        });
        mnuGeral.add(jMenuItem18);

        mnuMenu.add(mnuGeral);

        setJMenuBar(mnuMenu);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(mnuAtalho, javax.swing.GroupLayout.DEFAULT_SIZE, 700, Short.MAX_VALUE)
            .addComponent(pnlRodape, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addComponent(pnlCentro, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(mnuAtalho, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(pnlCentro, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(pnlRodape, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
        );

        pack();
        setLocationRelativeTo(null);
    }// </editor-fold>//GEN-END:initComponents

    private void btnSairActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSairActionPerformed
        
        int op;
        op = JOptionPane.showConfirmDialog(null, "Tem certeza que deseja sair do sistema ?");
        if(op == 0){
            System.exit(0);
        }
        
    }//GEN-LAST:event_btnSairActionPerformed

    private void btnSair2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSair2ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_btnSair2ActionPerformed

    private void btnSair3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSair3ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_btnSair3ActionPerformed

    private void btnSair4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSair4ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_btnSair4ActionPerformed

    private void btnSair5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSair5ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_btnSair5ActionPerformed

    private void btnSair6ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSair6ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_btnSair6ActionPerformed

    private void btnSair7ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSair7ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_btnSair7ActionPerformed

    private void btnSair8ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSair8ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_btnSair8ActionPerformed

    private void btnSair9ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSair9ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_btnSair9ActionPerformed

    private void jMenuItem16ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem16ActionPerformed
        int op;
        op = JOptionPane.showConfirmDialog(null, "Tem certeza que deseja sair do sistema ?");
        if(op == 0){
            System.exit(0);
        }
    }//GEN-LAST:event_jMenuItem16ActionPerformed

    private void jMenuItem6ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem6ActionPerformed

        form_usuario fusuario = new form_usuario();
        
        this.pnlTela.removeAll();
        this.pnlTela.repaint();
        this.pnlTela.revalidate();
        this.pnlTela.add(fusuario);
        this.pnlTela.repaint();
        this.pnlTela.revalidate();
        
    }//GEN-LAST:event_jMenuItem6ActionPerformed

    private void btnSair1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSair1ActionPerformed

        form_capa fcapa = new form_capa();
        
        this.pnlTela.removeAll();
        this.pnlTela.repaint();
        this.pnlTela.revalidate();
        this.pnlTela.add(fcapa);
        this.pnlTela.repaint();
        this.pnlTela.revalidate();
        
    }//GEN-LAST:event_btnSair1ActionPerformed

    private void jMenuItem5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem5ActionPerformed

        form_grupo fgrupo = new form_grupo();
        
        this.pnlTela.removeAll();
        this.pnlTela.repaint();
        this.pnlTela.revalidate();
        this.pnlTela.add(fgrupo);
        this.pnlTela.repaint();
        this.pnlTela.revalidate();
        
    }//GEN-LAST:event_jMenuItem5ActionPerformed

    private void jMenuItem18ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem18ActionPerformed

        this.pnlTela.removeAll();
        this.pnlTela.repaint();
        this.pnlTela.revalidate();
        
    }//GEN-LAST:event_jMenuItem18ActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(gui_principal.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(gui_principal.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(gui_principal.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(gui_principal.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new gui_principal().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnSair;
    private javax.swing.JButton btnSair1;
    private javax.swing.JButton btnSair2;
    private javax.swing.JButton btnSair3;
    private javax.swing.JButton btnSair4;
    private javax.swing.JButton btnSair5;
    private javax.swing.JButton btnSair6;
    private javax.swing.JButton btnSair7;
    private javax.swing.JButton btnSair8;
    private javax.swing.JButton btnSair9;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JMenuItem jMenuItem1;
    private javax.swing.JMenuItem jMenuItem10;
    private javax.swing.JMenuItem jMenuItem11;
    private javax.swing.JMenuItem jMenuItem12;
    private javax.swing.JMenuItem jMenuItem13;
    private javax.swing.JMenuItem jMenuItem14;
    private javax.swing.JMenuItem jMenuItem15;
    private javax.swing.JMenuItem jMenuItem16;
    private javax.swing.JMenuItem jMenuItem17;
    private javax.swing.JMenuItem jMenuItem18;
    private javax.swing.JMenuItem jMenuItem2;
    private javax.swing.JMenuItem jMenuItem3;
    private javax.swing.JMenuItem jMenuItem4;
    private javax.swing.JMenuItem jMenuItem5;
    private javax.swing.JMenuItem jMenuItem6;
    private javax.swing.JMenuItem jMenuItem7;
    private javax.swing.JMenuItem jMenuItem8;
    private javax.swing.JMenuItem jMenuItem9;
    private javax.swing.JLabel lblData;
    private javax.swing.JLabel lblUsuario;
    private javax.swing.JToolBar mnuAtalho;
    private javax.swing.JMenu mnuCaixa;
    private javax.swing.JMenu mnuConfiguracao;
    private javax.swing.JMenu mnuConsulta;
    private javax.swing.JMenu mnuGeral;
    private javax.swing.JMenu mnuManutencao;
    private javax.swing.JMenuBar mnuMenu;
    private javax.swing.JMenuItem mnuNivelAcesso;
    private javax.swing.JMenu mnuPedido;
    private javax.swing.JPanel pnlCentro;
    private javax.swing.JPanel pnlDireito;
    private javax.swing.JPanel pnlRodape;
    private javax.swing.JPanel pnlTela;
    // End of variables declaration//GEN-END:variables

    //DATA E HORA
    public void DataHora(){
        //NOVA THREAD
        new Thread() {
            @Override
            public void run() {
                for(;;) {
                    SimpleDateFormat mascara = new SimpleDateFormat("dd 'de' MMMM 'de' yyyy  |  HH:mm:ss");
                    String data = mascara.format(new Date());
                    lblData.setText(data);
                    //Define o tempo de atualização do label
                    try {
                        sleep(1000);
                    }//TRY
                    catch (InterruptedException ex) {
                        JOptionPane.showMessageDialog(null, "Ocorreu um problema !");
                    }//CHATCH  
                }//FOR 
            }//RUN
        }//THREAD
        .start();
    }//DATA HORA

    private void setIcon() {
        setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource("/img/imagens/favicon-mgs.png")));
    }//ICONE 
    
}
